package o;

import android.content.SharedPreferences.Editor;
import com.huawei.appgallery.foundation.account.bean.UserSession;

public class cat {
    private static cat ˎ;

    public static synchronized cat ˋ() {
        cat o_cat;
        synchronized (cat.class) {
            if (ˎ == null) {
                ˎ = new cat();
            }
            o_cat = ˎ;
        }
        return o_cat;
    }

    private cat() {
    }

    private String ˊ(String str) {
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append("section_detail_tab_").append(str);
        return stringBuilder.toString();
    }

    private String ˏ() {
        return "post_read_ids";
    }

    public void ˎ(String str, String str2) {
        if (UserSession.getInstance().isLoginSuccessful()) {
            Editor edit = ContentManager.getInstant().getContext().getSharedPreferences("forum_section", 0).edit();
            edit.putString(ˊ(str), str2);
            edit.commit();
        }
    }

    public String ˋ(String str) {
        if (UserSession.getInstance().isLoginSuccessful()) {
            return ContentManager.getInstant().getContext().getSharedPreferences("forum_section", 0).getString(ˊ(str), null);
        }
        return null;
    }

    public void ॱ(String str) {
        if (UserSession.getInstance().isLoginSuccessful()) {
            Editor edit = ContentManager.getInstant().getContext().getSharedPreferences("forum_section", 0).edit();
            edit.putString(ˏ(), str);
            edit.commit();
        }
    }

    public String ˊ() {
        if (UserSession.getInstance().isLoginSuccessful()) {
            return ContentManager.getInstant().getContext().getSharedPreferences("forum_section", 0).getString(ˏ(), null);
        }
        return null;
    }

    public synchronized void ॱ() {
        bqx.ˊ("SectionStorageManager", "clear");
        Editor edit = ContentManager.getInstant().getContext().getSharedPreferences("forum_section", 0).edit();
        edit.clear();
        edit.commit();
    }
}
